package cn.saddyfire.pattern.responsibility;

/**
 * @author Dee
 * @date 2024/2/25
 * <p>Description:
 */
public class Client {
    public static void main(String[] args) {
        //创建请假条对象
        LeaveRequest request = new LeaveRequest("张三", 3, "身体不适");

        //创建各级领导对象
        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();

        //设置处理者链
        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);

        //张三提交请假申请
        groupLeader.submit(request);
    }
}
